package com.tanhua.api.db;

import com.tanhua.api.db.UserInfoApi;
import com.tanhua.domain.db.UserInfo;
import com.tanhua.mapper.UserInfoMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class UserInfoApiImpl implements UserInfoApi {
    @Autowired
    private UserInfoMapper userInfoMapper;
    @Override
    public void save(UserInfo userInfo) {
        userInfoMapper.insert(userInfo);

    }

    @Override
    public void update(UserInfo userInfo) {
        userInfoMapper.updateById(userInfo);


    }

    @Override
    public UserInfo fingByUserId(Long userId) {
        return userInfoMapper.selectById(userId);
    }
}
